<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <title>Scrumptious: <%= controller.action_name %></title>
    <% if @user.nil? %>
      <%= stylesheet_link_tag 'application' %>
    <% else %>
	  <% if @user.profile %>
        <%= stylesheet_link_tag @user.profile.stylesheet %>
      <% else %>
        <%= stylesheet_link_tag 'application' %>
	  <% end %>
	<% end %>
	
</head>
<body>
<div id="container">


  <!-- start header -->
    <div id="header">
      <div id="logo">
        <h1><a href="#">SCRUMPTIOUS</a></h1>
      </div>
    </div>

<!-- start  navigation-->
  <div id="navbar">
		<div id="menu">
      <ul>
				<li><%= link_to 'Home', profiles_path %></li>
				<li><%= link_to 'Profiles', profiles_path %></li>
        <% if @user %>
          <% if @user.profile %>
            <li><%= link_to 'My Profile', @user.profile %></li>
          <% else %>
            <li><%= link_to 'Create my profile', new_profile_path %></li>
          <% end %>
          <li><%= link_to 'Log out', logout_path %></li>
        <% else %>
           <li><%= link_to 'Log in', login_path %></li>
        <% end %>
        <li><%= link_to 'Forums', forums_path %></li>
        <li><%= link_to 'Blog', posts_path %></li>
			</ul>
    </div>
    
    <br/><br/>

  <%= yield %>

  <div id="footer">
    <p id="legal">Copyright &copy: 2011. All Rights Reserved. SCRUMPTIOUS</a></p>
	</div>		
  
	</div>
</body>
</html>
